<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="./template.xhtml">

    <ui:define name="head">
		<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
	</ui:define>
    
    <ui:define name="title">
        GMap - <span class="subitem">Info Window</span>
    </ui:define>

    <ui:define name="description">
        When a marker is selected, an info window can be displayed to provide detailed information.
    </ui:define>

    <ui:param name="documentationLink" value="/components/gmap" />

    <ui:define name="implementation">

        <h:form prependId="false">	
            <p:gmap id="gmap" center="36.890257,30.707417" zoom="13" type="HYBRID" model="#{infoWindowView.advancedModel}" style="width:100%;height:400px">

                <p:ajax event="overlaySelect" listener="#{infoWindowView.onMarkerSelect}" />

                <p:gmapInfoWindow id="infoWindow">
                    <p:outputPanel style="text-align: center; display: block; margin: auto">

                            <p:graphicImage name="/demo/images/antalya/#{infoWindowView.marker.data}" height="150" />
                            <br />
                            <h:outputText value="#{infoWindowView.marker.title}" />

                    </p:outputPanel>
                </p:gmapInfoWindow>
            </p:gmap>

            <!-- Preload for demo -->
            <p:outputPanel style="display:none">
                <p:graphicImage name="/demo/images/antalya/konyaalti.png" />
                <p:graphicImage name="/demo/images/antalya/ataturkparki.png" />
                <p:graphicImage name="/demo/images/antalya/kaleici.png" />
                <p:graphicImage name="/demo/images/antalya/karaalioglu.png" />
            </p:outputPanel>
        </h:form>
        
    </ui:define>

</ui:composition>
